home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 84 / MacAddict_084_2003_08.iso / mac / Software / Audio & Music / Audacity 1.1.3.dmg / nyquist / test.lsp < prev    next >
Lisp/Scheme  |  2002-09-16  |  1KB  |  44 lines

  1.  
  2. (defun ss () (osc c5))
  3.  
  4. (defun tt () (stretch 2 (snd-tapv (ss) 1.1 (scale *d* (lfo 10)) 2.2)))
  5. (setf *d* .01)
  6.  
  7. (defun g () (play (tt)))
  8.  
  9. ;(set-sound-srate 10)
  10. ;(set-control-srate 10)
  11. (defun rr () (stretch 10 (ramp)))
  12. (defun ll () (stretch 10 (lfo .5)))
  13. (defun xx () (snd-tapv (rr) 1.1 (ll) 2.2))
  14. (defun h () (snd-samples (xx) 150))
  15.  
  16. (defun chorus (sound maxdepth depth rate saturation)
  17.   (let ((modulation (prod depth (stretch-abs 10000.0 (general-lfo rate))))
  18.         (offset (/ maxdepth 2.0))
  19.         chor)
  20.     (setf chor (snd-tapv sound offset modulation maxdepth))
  21.     (sum (prod chor saturation) (prod (seq (s-rest offset) sound)
  22.                                           (sum 1.0 (prod -1.0 saturation))))))
  23.  
  24.  
  25. (set-sound-srate 22050.0)
  26.  
  27. (defun f ()
  28.  (chorus (s-read "runtime\\ah.wav") .1 .1 1 .5))
  29.  
  30. (defun e ()
  31.  (seq (s-rest .05) (chorus (s-read "rpd.wav") .07 .07 .7 .5)))
  32.  
  33. (defun d () (sum (e) (f)))
  34.  
  35. (defun rou () (s-read "round.wav" :time-offset 1.18 :dur (- 8.378 1.18)))
  36.  
  37. (defun rou4 () (sim (rou)
  38.                     (at *rd* (rou)) 
  39.                     (at (* *rd* 2) (rou)) 
  40.                     (at (* *rd* 3) (rou))))
  41.  
  42.  
  43.  
  44.